import http from '@/utils/request'
// 获取图像验证码
export const getPicCode = () => { return http.get('/captcha/image') }

// 获取短信验证码
export const getSMSCode = (data) => {
  return http.post('/captcha/sendSmsCaptcha', { form: data }, {
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

// 登录
export const login = (data) => {
  return http.post('/passport/login', { form: data }, {
    headers: {
      platform: 'H5'
    }
  })
}
